package com.nenglai.common.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.omg.CORBA.NO_PERMISSION;

@Getter
@AllArgsConstructor
public enum ErrorCode {

    FORBID_NO_CONDITION_REMOVE(10, "禁止无条件清空操作！"),
    FORBID_NO_CONDITION_UPDATE(10, "禁止无条件更新操作！"),
    PROHIBIT_ADMIN_REMOVE_SELF(10, "禁止删除自己！"),
    PROHIBIT_REMOVE_SUPER(10, "超级管理员禁止删除！"),
    OBJECT_DOES_NOT_EXIST(10, "操作对象不存在！"),


    ERROR_CODE(3000, "操作错误"),
    CREATE_ERROR_CODE(3001, "创建失败！"),
    VALIDATOR_ERROR_CODE(3002, "验证失败"),
    UPDATE_ERROR_CODE(3003, "更新失败！"),
    EDITOR_EMPTY_CODE(3003, "更新数据不能为空！"),

    ERROR_CODE_500(500, "未知错误！"),


    TOKEN_NOT_FOUND(401, "Token not found!"),
    AUTH_ERROR(400, "认证失败！"),

    CAPTCHA_GENERATOR_FAIL(9000, "验证码生成异常"),
    LOGIN_FAIL(10001, "登录失败！"),


    REPORT_TEMPLATE_UPLOAD_FAIL(20001, "报告模板上传失败！"),
    THE_DOC_FORMAT_IS_NOT_SUPPORTED(20002, "暂不支持doc模板格式！"),
    JUST_SUPPORT_DOCX(20003, "当前系统目前仅支持doc,docx模板文件！"),
    NOT_SUPPORTED_TYPE(20004, "不支持的导出类型！"),
    NO_PERMISSION_TO_DELETE_FROM_OTHERS(20005, "无权删除他人报告"),
    REPORT_TEMPLATE_NOT_EXIST(20006, "报表模板不存在！"),
    REPORT_NOT_EXIST(20007, "报告不存在！"),
    NO_SHARED_REPORT_NOT_SUPPORTED_DOWNLOAD(20008, "未分享的报告禁止下载！"),

    ;

    private final Integer code;
    private final String message;
}
